fix: repair cross-package bugs so all tests and type checks pass - #99
Open
stooit wants to merge 1 commit into
Open
fix: repair cross-package bugs so all tests and type checks pass#99stooit wants to merge 1 commit into
stooit wants to merge 1 commit into
Conversation
- api.ts: update import to renamed hook from @e2e/utils (was useThrottle) - bunfig.toml: preload DOM setup so React component tests have document - Button: add aria-label for icon-only buttons (WCAG 2.2 SC 4.1.2) - DataTable: fix stale closure in sort handler (functional setState) - date.ts: correct locale/format string for formatDate No test files or dependencies changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Repairs four cross-package bugs (plus a test-harness config gap) so that
bun testandtsc --noEmitboth pass cleanly. Fixes were scoped to only what the tests require — no test files or dependencies were changed.Before: 9 failing tests, 5 type errors.
After: 13/13 tests pass,
tsc --noEmitexits 0.Changes
apps/web/src/lib/api.ts— updated import to the renamed hook in@e2e/utils(olduseThrottlename still imported after rename), fixingTS2305.bunfig.toml— added the DOM setup preload so React component tests have adocument(fixesReferenceError: document is not defined).packages/ui/src/components/Button/Button.tsx— addedaria-labelfor icon-only buttons (WCAG 2.2 SC 4.1.2).packages/ui/src/components/DataTable/DataTable.tsx— fixed a stale-closure bug in the sort handler (functional state update) caught by the controlled re-render test.packages/utils/src/format/date.ts— corrected the locale/format string informatDate.Verification
bun test→ 13 pass / 0 failnpx tsc --noEmit→ exit 0Assumptions
bunfig.tomlpreload (the setup file already existed); treated as a harness config gap rather than a source bug.